﻿<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!DOCTYPE html>
<head th:include="common/common_head::commonHeader('dalaoyang')"></head>

<body>
    <div id="wrapper">

        <div th:include="common/navigation :: navigation"></div>

        <div id="page-wrapper" >
            <div id="page-inner">
			 <div class="row">
                    <div class="col-md-12">
                        <h1 class="page-header">
                            <span>系统配置</span><small>注意：请确认填写的地址是否正确（部分内容区分大小写）</small>
                        </h1>
                    </div>
                </div> 
                 <!-- /. ROW  -->
              <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            系统配置信息
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-12">
                                    <form role="form" id="sysForm" th:action="@{/system/updateSystemProperty}" method="post">
                                        <input type="hidden" name="id" th:value="${websiteSystemProperty==null?0:websiteSystemProperty.id}">
                                        <div class="form-group">
                                            <label>网站地址</label>
                                            <input class="form-control" type="text" name="websiteUrl" id="websiteUrl" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.websiteUrl}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>网站名称</label>
                                            <input class="form-control" type="text" name="websiteName"  id="websiteName" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.websiteName}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>网站域名</label>
                                            <input class="form-control" type="text" name="domainName" id="domainName" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.domainName}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>网站备案号</label>
                                            <input class="form-control" type="text" name="beianNumber"  id="beianNumber" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.beianNumber}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>wechat图片名称</label>
                                            <input class="form-control" type="text" name="wechatName" id="wechatName" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.wechatName}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>微博地址</label>
                                            <input class="form-control" type="text" name="weiboUrl"  id="weiboUrl" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.weiboUrl}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>码云地址</label>
                                            <input class="form-control" type="text" name="giteeUrl" id="giteeUrl" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.giteeUrl}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>个人邮箱地址</label>
                                            <input class="form-control" type="text" name="emailUrl"  id="emailUrl" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.emailUrl}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>csdn地址</label>
                                            <input class="form-control" type="text" name="csdnUrl" id="csdnUrl" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.csdnUrl}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>其他博客地址，例如博客园等</label>
                                            <input class="form-control" type="text" name="blogUrl"  id="blogUrl" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.blogUrl}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>简书地址</label>
                                            <input class="form-control" type="text" name="jianshuUrl" id="jianshuUrl" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.jianshuUrl}" required>
                                        </div>
                                        <div class="form-group">
                                            <label>个人公众号名称</label>
                                            <input class="form-control" type="text" name="gongzhonghaoName"  id="gongzhonghaoName" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.gongzhonghaoName}" required>
                                        </div>

                                        <div class="form-group">
                                            <label>公众号图片名称</label>
                                            <input class="form-control" type="text" name="gongzhonghaoTrueName"  id="gongzhonghaoTrueName" th:value="${websiteSystemProperty==null?'':websiteSystemProperty.gongzhonghaoTrueName}" required>
                                        </div>


                                        <button class="btn btn-default" onclick="postSystemProperty()">提交</button>
                                    </form>
                                </div>
                                <!-- /.col-lg-6 (nested) -->
                            </div>
                            <!-- /.row (nested) -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
			<footer>
                <div th:include="common/footer :: footer"></div>
            </footer>
			</div>
             <!-- /. PAGE INNER  -->
            </div>
         <!-- /. PAGE WRAPPER  -->
        </div>

    <script type="text/javascript"  th:inline="javascript">
        function  postSystemProperty(){
            $("#sysForm").validate({
                submitHandler:function(form){
                    alert("提交事件!");
                    form.submit();
                }
            });
        }


    </script>
</body>
</html>
